package com.yugao.fintech.antelope.system.assembly;

import com.yugao.fintech.antelope.system.model.entity.SysDept;
import com.yugao.fintech.antelope.system.model.rqrs.dept.DeptListReq;
import com.yugao.fintech.antelope.system.model.rqrs.dept.DeptResp;
import com.yugao.fintech.antelope.system.model.rqrs.dept.DeptUpdateReq;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;


@Mapper(componentModel = "spring")
public interface SysDeptAssembly {
    @Mappings({
            @Mapping(source = "id", target = "key"),
            @Mapping(source = "id", target = "value"),
            @Mapping(source = "deptName", target = "title"),
    })
    DeptResp toDeptTreeResp(SysDept source);

    SysDept toDept(DeptUpdateReq source);

    SysDept toDept(DeptListReq source);
}
